package com.gene.service.impl;

import com.gene.mapper.UserRebateMapper;
import com.gene.service.IUserRebateSumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserRebateSumServiceImpl implements IUserRebateSumService {

    @Autowired
    private UserRebateMapper userRebateMapper;
    /**
     * 根据用户Id查询该用户的个人收益
     * @param userId
     * @return
     */
    @Override
    public Double query(Integer userId) {
        Double money=userRebateMapper.querySumIncome(userId);
        return money==null?0:money;
    }
}
